package cloudgamesaumysql

import (
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/8/27 16:56
*/

// CGGameAUUserTimeCurrentBill 云游戏AU用户时长流转记录表
type CGGameAUUserTimeCurrentBill struct {
	ID                                         int64          `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	UserID                                     int64          `json:"user_id" gorm:"column:user_id;type:bigint;not null;default:0;comment:用户ID"`
	PresentTotalDuration                       int64          `json:"present_total_duration" gorm:"column:present_total_duration;type:bigint;not null;default:0;comment:累计时长"`
	PresentAvailableDuration                   int64          `json:"present_available_duration" gorm:"column:present_available_duration;type:bigint;not null;default:0;comment:可用时长"`
	PresentConsumedDuration                    int64          `json:"present_consumed_duration" gorm:"column:present_consumed_duration;type:bigint;not null;default:0;comment:已消耗时长"`
	PresentFrozenDuration                      int64          `json:"present_frozen_duration" gorm:"column:present_frozen_duration;type:bigint;not null;default:0;comment:冻结时长"`
	PresentUserLoginFreeTime                   int64          `json:"present_user_login_free_time" gorm:"column:present_user_login_free_time;type:bigint;not null;default:0;comment:用户的登录免费时长"`
	PresentConsumedUserLoginFreeTime           int64          `json:"present_consumed_user_login_free_time" gorm:"column:present_consumed_user_login_free_time;type:bigint;not null;default:0;comment:消耗用户的登录免费时长"`
	PresentFrozenUserLoginFreeTime             int64          `json:"present_frozen_user_login_free_time" gorm:"column:present_frozen_user_login_free_time;type:bigint;not null;default:0;comment:冻结用户的登录免费时长"`
	PresentUserRechargeFreeTime                int64          `json:"present_user_recharge_free_time" gorm:"column:present_user_recharge_free_time;type:bigint;not null;default:0;comment:用户的充值免费时长"`
	PresentConsumedUserRechargeFreeTime        int64          `json:"present_consumed_user_recharge_free_time" gorm:"column:present_consumed_user_recharge_free_time;type:bigint;not null;default:0;comment:消耗用户的充值免费时长"`
	PresentFrozenUserRechargeFreeTime          int64          `json:"present_frozen_user_recharge_free_time" gorm:"column:present_frozen_user_recharge_free_time;type:bigint;not null;default:0;comment:冻结用户的充值免费时长"`
	OperationType                              string         `json:"operation_type" gorm:"column:operation_type;type:varchar(32);default:'';not null;comment:操作类型"`
	TotalDurationAfterOperation                int64          `json:"total_duration_after_operation" gorm:"column:total_duration_after_operation;type:bigint;not null;default:0;comment:操作后累计时长"`
	AvailableDurationAfterOperation            int64          `json:"available_duration_after_operation" gorm:"column:available_duration_after_operation;type:bigint;not null;default:0;comment:操作后可用时长"`
	ConsumedDurationAfterOperation             int64          `json:"consumed_duration_after_operation" gorm:"column:consumed_duration_after_operation;type:bigint;not null;default:0;comment:操作后已消耗时长"`
	FrozenDurationAfterOperation               int64          `json:"frozen_duration_after_operation" gorm:"column:frozen_duration_after_operation;type:bigint;not null;default:0;comment:操作后冻结时长"`
	UserLoginFreeTimeAfterOperation            int64          `json:"user_login_free_time_after_operation" gorm:"column:user_login_free_time_after_operation;type:bigint;not null;default:0;comment:操作后用户的登录免费时长"`
	ConsumedUserLoginFreeTimeAfterOperation    int64          `json:"consumed_user_login_free_time_after_operation" gorm:"column:consumed_user_login_free_time_after_operation;type:bigint;not null;default:0;comment:操作后消耗用户的登录免费时长"`
	FrozenUserLoginFreeTimeAfterOperation      int64          `json:"frozen_user_login_free_time_after_operation" gorm:"column:frozen_user_login_free_time_after_operation;type:bigint;not null;default:0;comment:操作后冻结用户的登录免费时长"`
	UserRechargeFreeTimeAfterOperation         int64          `json:"user_recharge_free_time_after_operation" gorm:"column:user_recharge_free_time_after_operation;type:bigint;not null;default:0;comment:操作后用户的充值免费时长"`
	ConsumedUserRechargeFreeTimeAfterOperation int64          `json:"consumed_user_recharge_free_time_after_operation" gorm:"column:consumed_user_recharge_free_time_after_operation;type:bigint;not null;default:0;comment:操作后消耗用户的充值免费时长"`
	FrozenUserRechargeFreeTimeAfterOperation   int64          `json:"frozen_user_recharge_free_time_after_operation" gorm:"column:frozen_user_recharge_free_time_after_operation;type:bigint;not null;default:0;comment:操作后冻结用户的充值免费时长"`
	OperationMethod                            string         `json:"operation_method" gorm:"column:operation_method;type:varchar(32);default:'';not null;comment:操作方式"`
	CreatedAt                                  time.Time      `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt                                  time.Time      `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt                                  gorm.DeletedAt `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAUUserTimeCurrentBill) TableName() string {
	return "cg_game_au_user_time_current_bill"
}
